package com.ws.test04.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * @author 王硕
 * @version jdk21
 * @className User
 * @description
 * @date 2024/11/21 21:20
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private String username;
    private String password;
    private boolean isOnline;
    public void printInfo() {
        System.out.println("用户名: " + username + ", 密码: " + password + ", 在线状态: " + (isOnline ? "在线" : "离线"));
    }
}
